﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CS_BEGINNER_TO_PROFICIENT.STD.DelegatedSTD
{
    public class DelegatedSTDP3
    {
       public static void Execute()
        {
            MyDelegate del1 = delegate (string message)
            {
                Console.WriteLine("Anonymous method: " + message);
            };

            MyDelegate del2 = message => Console.WriteLine("Lambda: " + message);

            del1("Hello World!");
            del2("Hello World!");
        }
    }
}
